###
 # @Description: 
 # @Author: sanghx
 # @Date: 2020-07-10 14:16:16
 # @LastEditors: sanghx
 # @LastEditTime: 2020-07-22 09:11:59
###

#!/usr/bin/env sh

# 当发生错误时中止脚本
set -e

# 构建
npm run gen

# cd 到构建输出的目录下 
cd dist

# 部署到自定义域域名
# echo 'www.example.com' > CNAME

git init
git add -A
git commit -m '生成可访问页'

# 部署到 https://<USERNAME>.github.io
git push -f git@gitee.com:sanghongxv/divcode.git master:ge-pages

cd -